﻿using System;
using System.Collections.Generic;
using DapperExtensions.Mapper;
using Newtonsoft.Json;
using ZLWeb.WebApiEntityBase;
using ZilLion.Service.Core.Domain.EntityBase.JsonConverter;

namespace ZL.CRM.CommonEntity.Peizh
{
    public class zzinfo: ResponseResultInfo
    {
        /// <summary>
        ///  充值收款（禁止小数）
        /// </summary>
        public int czxk { get; set; }

        /// <summary>
        ///  赠送内容：1-增值钱包
        /// </summary>
        public short czzsnr { get; set; }

        /// <summary>
        ///  赠送值（禁止小数）
        /// </summary>
        public int czzsz { get; set; }

        /// <summary>
        /// 设置人id
        /// </summary>
        public int czoprid { get; set; }

        /// <summary>
        /// 设置人名称
        /// </summary>
        public string czoprname { get; set; }

        /// <summary>
        /// 设置时间
        /// </summary>
        [JsonConverter(typeof(ChinaDateTimeConverter))]
        public DateTime czoprtime { get; set; }

        public int Sn { get; set; }
    }

    public class zzinfoMapper : ClassMapper<zzinfo>
    {
        public zzinfoMapper()
        {
            Table("#zzinfo");
            Map(f => f.czxk).Column("czxk");
            Map(f => f.czzsnr).Column("czzsnr");
            Map(f => f.czzsz).Column("czzsz");
            Map(f => f.czoprid).Column("czoprid");
            Map(f => f.czoprname).Column("czoprname");
            Map(f => f.czoprtime).Column("czoprtime");
        }
    }

    public class ZzinfocsCacheItem
    {
        public const string CacheKey = "CRMZzinfocs";
        public IEnumerable<zzinfo> infocs { get; set; }
        public int kinfocslogsn { get; set; }
    }
}
